package com.dd.ms.nacos.utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @Author liuxianmeng
 * @CreateTime 2025/3/9 15:37
 * @Description Nacos用户密码生成
 */
public class NacosPwdUtil {
    public static String geneNacosEncodedPwd(String pwd) {
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        // qwerty123 -> $2a$10$MArKu7crJjIyao3A8KyTvuNg9xdSH1/ijsXjaMaI1guuxTrrGDyBa
        return encoder.encode(pwd);
    }
}
